package cz.proks.easyhelpdesk.gwt.place;

import java.util.List;


public class ThreadPlace extends HelpdeskMainPlace {
    private Long threadId;
           
    public ThreadPlace(Long helpdeskId, Long threadId) {
        super(helpdeskId);
        this.threadId = threadId;
        addValue(threadId);        
    }

    public Long getThreadId() {
        return threadId;
    }

    @Override
    public String getPattern() {        
        return super.getPattern() + "/thread/{threadId}";
    }

    @Override
    public void initFromList(List<String> initValues) {
        super.initFromList(initValues);
        assertInitValues(initValues, 2);
        
        this.threadId = Long.valueOf(initValues.get(1));
        setPlaceValues(initValues);
    }        
}
